package co.edu.usbcali.modelo;
// Generated 26/09/2011 12:36:11 AM by Zathura powered by Hibernate Tools 3.2.4.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * ProgramaAcademico generated by Zathura powered by Hibernate-tools(hbm2java)
 */
@Entity
@Table(name="PROGRAMA_ACADEMICO"
    ,schema="GPE"
)
public class ProgramaAcademico  implements java.io.Serializable {


     private Long codigoPrograma;
     private String nombrePrograma;
     private Set<Practicante> practicantes = new HashSet<Practicante>(0);

    public ProgramaAcademico() {
    }

	
    public ProgramaAcademico(Long codigoPrograma, String nombrePrograma) {
        this.codigoPrograma = codigoPrograma;
        this.nombrePrograma = nombrePrograma;
    }
    public ProgramaAcademico(Long codigoPrograma, String nombrePrograma, Set<Practicante> practicantes) {
       this.codigoPrograma = codigoPrograma;
       this.nombrePrograma = nombrePrograma;
       this.practicantes = practicantes;
    }
   
    @SequenceGenerator(name="G_Programa",initialValue=1,allocationSize=1,sequenceName="incremento_cod_programa")
    @Id @GeneratedValue(generator="G_Programa",strategy=GenerationType.SEQUENCE)

    
    @Column(name="CODIGO_PROGRAMA", unique=true, nullable=false, precision=5, scale=0)
    public Long getCodigoPrograma() {
        return this.codigoPrograma;
    }
    
    public void setCodigoPrograma(Long codigoPrograma) {
        this.codigoPrograma = codigoPrograma;
    }

    
    @Column(name="NOMBRE_PROGRAMA", nullable=false, length=30)
    public String getNombrePrograma() {
        return this.nombrePrograma;
    }
    
    public void setNombrePrograma(String nombrePrograma) {
        this.nombrePrograma = nombrePrograma;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="programaAcademico")
    public Set<Practicante> getPracticantes() {
        return this.practicantes;
    }
    
    public void setPracticantes(Set<Practicante> practicantes) {
        this.practicantes = practicantes;
    }




}


